helpstring("PDFlib 2.01 Type library by Thomas Merz"),
lcid (0x00000000), // language 0 = neutral
version(2.01)
]
library PDFlib { // library name
[ dllname("pdflib_vb.dll") ]
module PDFlib { // class name
[entry("PDF_boot"), helpstring("Boot PDFlib (currently not required)"),]
void PDF_boot(void);
[entry("PDF_shutdown"), helpstring("Shut down PDFlib (currently not required)"),]
void PDF_shutdown(void);
[entry("PDF_get_opaque"), helpstring("Fetch opaque application pointer stored in PDFlib"),]
void *PDF_get_opaque([in] long p);
[entry("PDF_new2"), helpstring("Create new PDF object, optionally supplying error handler and memory allocation routines"),]
long PDF_new2([in] long errorhandler, [in] long allocproc, [in] long reallocproc, [in] long freeproc, [in] long opaque);
//long PDF_new2([in] void (*errorhandler)(long p, int type, LPCSTR msg), [in] long allocproc, [in] long reallocproc, [in] long freeproc, [in] long opaque);
[entry("PDF_new"), helpstring("Create a new PDF object"),]
long PDF_new(void);
[entry("PDF_delete"), helpstring("Delete a PDF object"),]
void PDF_delete([in] long p);
[entry("PDF_open_file"), helpstring("Open a new PDF file associated with p, using the supplied file name"),]
int PDF_open_file([in] long p, [in] LPCSTR filename);
[entry("PDF_close"), helpstring("Close the generated PDF file"),]
void PDF_close([in] long p);
[entry("PDF_begin_page"), helpstring("Start a new page"),]
void PDF_begin_page([in] long p, [in] float width, [in] float height);
[entry("PDF_end_page"), helpstring("Finish the page"),]
void PDF_end_page([in] long p);
[entry("PDF_set_transition"), helpstring("Set a transition effect for the current page"),]
void PDF_set_transition([in] long p, [in] LPCSTR type);
[entry("PDF_set_duration"), helpstring("Set the duration for a page transition effect"),]
void PDF_set_duration([in] long p, [in] float t);
[entry("PDF_set_parameter"), helpstring(""),]
void PDF_set_parameter([in] long p, [in] LPCSTR key, [in] LPCSTR value);
[entry("PDF_show"), helpstring("Print text in the current font at the current position"),]
void PDF_show([in] long p, [in] LPCSTR text);
[entry("PDF_show_xy"), helpstring("Print text in the current font at (x, y)"),]
[entry("PDF_continue_text"), helpstring("Print text at the next line"),]
void PDF_continue_text([in] long p, [in] LPCSTR text);
[entry("PDF_set_leading"), helpstring("Set the distance between text baselines"),]
void PDF_set_leading([in] long p, [in] float l);
[entry("PDF_set_text_rise"), helpstring("Set the text rise parameter"),]
void PDF_set_text_rise([in] long p, [in] float rise);
[entry("PDF_set_horiz_scaling"), helpstring("Set horizontal text scaling in percent"),]
void PDF_set_horiz_scaling([in] long p, [in] float scale);
[entry("PDF_set_text_rendering"), helpstring("Set text rendering mode"),]
void PDF_set_text_rendering([in] long p, [in] int mode);
[entry("PDF_set_text_matrix"), helpstring("Set a transformation matrix to be applied to the current font"),]
void PDF_set_text_matrix([in] long p, [in] float a, [in] float b, [in] float c, [in] float d, [in] float e, [in] float f);
[entry("PDF_set_text_pos"), helpstring("Set the text output position to (x, y)"),]
void PDF_set_text_pos([in] long p, [in] float x, [in] float y);
[entry("PDF_set_char_spacing"), helpstring("Set the horizontal character spacing in text space units"),]
void PDF_set_char_spacing([in] long p, [in] float spacing);
[entry("PDF_set_word_spacing"), helpstring("Set the horizontal word spacing in text space units"),]
void PDF_set_word_spacing([in] long p, [in] float spacing);
[entry("PDF_get_fontname"), helpstring("Return the name of the current font"),]
LPCSTR PDF_get_fontname([in] long p);
[entry("PDF_get_fontsize"), helpstring("Return the size of the current font"),]
float PDF_get_fontsize([in] long p);
[entry("PDF_get_font"), helpstring("Return the identifier of the current font"),]
int PDF_get_font([in] long p);
[entry("PDF_stringwidth"), helpstring("Return the width of text in an arbitrary font which has been selected with PDF_findfont()"),]
float PDF_stringwidth([in] long p, [in] LPCSTR text, [in] int font, [in] float size);
[entry("PDF_findfont"), helpstring("Prepare a font for later use with PDF_setfont(). The metrics will be loaded, and if embed is nonzero, the font file will be checked (but not yet used)."),]
int PDF_findfont([in] long p, [in] LPCSTR fontname, [in] LPCSTR encoding, [in] int embed);
[entry("PDF_setfont"), helpstring("Set the current font in the give size. The font descriptor must have been retrieved via PDF_findfont()"),]
void PDF_setfont([in] long p, [in] int font, [in] float fontsize);
[entry("PDF_save"), helpstring("Save the current graphics state"),]
long PDF_save ([in] long p);
[entry("PDF_restore"), helpstring("Restore the most recently saved graphics state"),]
long PDF_restore ([in] long p);
[entry("PDF_translate"), helpstring("Translate the origin of the coordinate system to (tx, ty)"),]
long PDF_translate ([in] long p, [in] float tx, [in] float ty);
[entry("PDF_scale"), helpstring("Scale the coordinate system by (sx, sy)"),]
void PDF_scale([in] long p, [in] float sx, [in] float sy);
[entry("PDF_rotate"), helpstring("Rotate the coordinate system by phi degrees"),]
long PDF_rotate ([in] long p, [in] float phi);
[entry("PDF_setdash"), helpstring("Set the current dash pattern to d1 white and d2 black units"),]
void PDF_setdash([in] long p, [in] float d1, [in] float d2);
[entry("PDF_setpolydash"), helpstring("Set a more complicated dash pattern defined by an array"),]
void PDF_setpolydash([in] long p, [in] float *darray, [in] int length);
[entry("PDF_setflat"), helpstring("Set the flatness to a value between 0 and 100 inclusive"),]
void PDF_setflat([in] long p, [in] float flat);
[entry("PDF_set_fillrule"), helpstring("Set the current fill rule to winding or evenodd"),]
void PDF_set_fillrule([in] long p, [in] LPCSTR *fillrule);
[entry("PDF_setlinejoin"), helpstring("Set the line join parameter to a value between 0 and 2 inclusive"),]
void PDF_setlinejoin([in] long p, [in] float join);
[entry("PDF_setlinecap"), helpstring("Set the linecap parameter to a value between 0 and 2 inclusive"),]
void PDF_setlinecap([in] long p, [in] float cap);
[entry("PDF_setmiterlimit"), helpstring("Set the miter limit to a value greater than or equal to 1"),]
void PDF_setmiterlimit([in] long p, [in] float miter);
[entry("PDF_setlinewidth"), helpstring("Set the current linewidth to width"),]
void PDF_setlinewidth([in] long p, [in] float width);
[entry("PDF_moveto"), helpstring("Set the current point to (x, y)"),]
long PDF_moveto ([in] long p, [in] float x, [in] float y);
[entry("PDF_lineto"), helpstring("Draw a line from the current point to (x, y)"),]
long PDF_lineto ([in] long p, [in] float x, [in] float y);
[entry("PDF_curveto"), helpstring("Draw a Bezier curve from the current point, using 3 more control points"),]
[entry("PDF_get_image_width"), helpstring("Return the width of an image"),]
int PDF_get_image_width([in] long p, [in] int image);
[entry("PDF_get_image_height"), helpstring("Return the height of an image"),]
int PDF_get_image_height([in] long p, [in] int image);
[entry("PDF_place_image"), helpstring("Place an image at the lower left corner (x, y), and scale it"),]
void PDF_place_image([in] long p, [in] int image, [in] float x, [in] float y, [in] float scale);
[entry("PDF_open_image"), helpstring("Use image data from memory or file reference. Returns an image descriptor or -1"),]
int PDF_open_image([in] long p, [in] LPCSTR type, [in] LPCSTR source, [in] LPCSTR data, [in] long len, [in] int width, [in] int height, [in] int components, [in] int bpc, [in] LPCSTR params);
[entry("PDF_open_JPEG"), helpstring("Open a JPEG image for later use. Returns an image descriptor or -1"),]
int PDF_open_JPEG([in] long p, [in] LPCSTR filename);
[entry("PDF_open_TIFF"), helpstring("Open a TIFF image for later use. Returns an image descriptor or -1"),]
int PDF_open_TIFF([in] long p, [in] LPCSTR filename);
[entry("PDF_open_GIF"), helpstring("Open a GIF image for later use. Returns an image descriptor or -1"),]
int PDF_open_GIF([in] long p, [in] LPCSTR filename);
[entry("PDF_open_CCITT"), helpstring("Open a raw CCITT image for later use. Returns an image descriptor or -1"),]
int PDF_open_CCITT([in] long p, [in] LPCSTR filename);
[entry("PDF_close_image"), helpstring("Close an image retrieved with one of the PDF_open_*() image functions. Usually not required, the image file will be closed anyway when the open function is done."),]
void PDF_close_image([in] long p, [in] int image);
[entry("PDF_add_bookmark"), helpstring("Add a nested bookmark under parent, or a new top-level bookmark if level = 0. Returns a bookmark descriptor which may be used as parent for subesequent nested bookmarks"),]
void PDF_add_bookmark([in] long p, [in] LPCSTR text, [in] int parent, [in] int open);
[entry("PDF_set_info"), helpstring("Fill document information field key with value"),]
long PDF_set_info ([in] long p, [in] LPCSTR key, [in] LPCSTR value);
[entry("PDF_attach_file"), helpstring("Add a file attachment annotation"),]
[entry("PDF_set_border_style"), helpstring("Set the border style for all kinds of annotations. These settings are used for all annotations until a new style is set"),]
void PDF_set_border_style([in] long p, [in] LPCSTR style, [in] float width);
[entry("PDF_set_border_color"), helpstring("Set the border color for all kinds of annotations"),]